package com.zyd.shiro.persistence.mapper;

import com.zyd.shiro.business.vo.CourseConditionVO;
import com.zyd.shiro.persistence.beans.ChooseCourse;
import com.zyd.shiro.persistence.beans.Course;
import com.zyd.shiro.plugin.BaseMapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface CourseMapper extends BaseMapper<Course> {

    List<Course> findPageBreakByCondition(CourseConditionVO vo);

    @MapKey("courseId")
    Map<Long, ChooseCourse> selectCourseChoose(@Param("cs")List<Course> cs,@Param("userId")Long userId);

    int deleteChooseCourse(@Param("courseId")Long courseId,@Param("userId")Long userId);

    int insertChooseCourse(@Param("courseId")Long courseId,@Param("userId")Long userId);
}